import {wrap} from 'svelte-spa-router/wrap'
import home from "@/pages/home/home.svelte";
import NotFound from "@/pages/404.svelte";

// https://www.npmjs.com/package/svelte-spa-router
const routes = {
  "/": home,
  
  // 栏目管理
  "/column":  wrap({
    asyncComponent: () => import('@/pages/column/column.svelte')
  }),
  '/column/details/:id': wrap({
    asyncComponent: () => import('@/pages/column/details.svelte')
  }),

  //站点管理
  "/site": wrap({ asyncComponent: () => import("../pages/site/site.svelte") }),
  '/site/config/*': wrap({
    asyncComponent: () => import('@/pages/site/config.svelte')
}),

'*': NotFound,
};

export default routes;
